<template>

  <el-container class="container">
    <!-- t头部 -->
  <el-header>
<div>
  <img src="../assets/heima.png" alt="">
  <span>电商后台管理系统</span>
</div>
      <el-button type="info" @click="logout">退出</el-button>
  </el-header>
  <el-container>
    <!-- 侧边栏 -->
    <el-aside width="200px">Aside</el-aside>
    <!-- 右边内容 -->
    <el-main>Main</el-main>
  </el-container>
</el-container>
</template>

<script>
export default {
    data(){
    return{

    }
    },
    methods: {
      logout(){
      
      // 清除token
        window.sessionStorage.clear()
        this.$router.push('/login')
    
      },
    }

}
</script>

<style lang="less" scoped>
.container{
  height: 100%;
}
.el-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color:#373d41;
  padding-left: 0px;
  color: #fff;
  font-size: 20px;
  >div{
    display: flex;
    align-items: center;
    span{
      margin-left: 15px;
    }
  }
}
.el-aside{
  background-color: #333744;
}
.el-main{
  background-color: #eaedf1;
}
</style>